/**  
 * @Title OrderCreatedValidator.java
 * @date 2016年4月26日 下午5:48:13
 * @Copyright (c) 2016, unibroad.com Inc. All rights reserved.
 */
package mt.validator;

import com.jfinal.core.Controller;
import com.jfinal.validate.Validator;

import base.ctrl.BaseResult;
import mt.Const;

/**
 * @Description 参数校验
 * @Class mt.ctrl.OrderCreatedValidator
 * @author suan@unibroad.com
 * @version V1.0
 */
public abstract class AbsCommonValidator extends Validator {

	@Override
	protected void handleError(Controller c) {
		c.keepPara();
		BaseResult<Object> result = new BaseResult<Object>().setSuccess(false)
				.setMessage(c.getAttrForStr(Const.ERRMSG_KEY));
		c.renderJson(result.toJsonString());

	}

}
